export default {
  height:'auto',
  calcHeight: 32,
  grid: true,
  gridSpan: 8,
  tip: false,
  searchShow: true,
  searchMenuSpan: 6,
  border: true,
  index: true,
  viewBtn: false,
  editBtn: false,
  delBtn: false,
  selection: true,
  dialogType: 'drawer',
  dialogWidth: 600,
  dialogClickModal: false,
  gridBackground: (row, index) => {
    if (row.status === 1) {
      return 'linear-gradient(to bottom, rgba(88, 158, 258, 0.1), white)'
    } else {
      return 'linear-gradient(to bottom, rgba(128, 128, 128, 0.1), white)'
    }
  },
  column: [
    {
      label: "品类名称",
      prop: "categoryName",
      type: "input",
      slot: true,
      search: true,
      rules: [{
        required: true,
        message: "请输入品类名称",
        trigger: "blur"
      }],
      span: 24,
      gridRow: true,
    },
    {
      label: "品类行业",
      prop: "categoryIndustry",
      type: "select",
      dicUrl: "/blade-system/dict/dictionary?code=category_industry",
      dataType: "number",
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      search: true,
      rules: [{
        required: true,
        message: "请选择品类行业",
        trigger: "blur"
      }],
      span: 24,
      gridRow: true,
    },
    {
      label: "品类场景",
      prop: "categoryScene",
      type: "select",
      dicUrl: "/blade-system/dict/dictionary?code=category_scene",
      dataType: "number",
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      search: true,
      rules: [{
        required: true,
        message: "请选择品类场景",
        trigger: "blur"
      }],
      span: 24,
      gridRow: true,
    },
    {
      label: '品类图标',
      type: 'upload',
      listType: 'picture-img',
      dataType: 'string',
      propsHttp: {
        res: 'data',
        url: 'link',
      },
      action: '/blade-resource/oss/endpoint/put-file',
      tip: '只能上传jpg/png文件，且不超过500kb',
      row: true,
      hide: true,
      prop: 'logo',
      span: 24,
      gridRow: true,
    },
    {
      label: "发布状态",
      prop: "status",
      type: "radio",
      dicUrl: "/blade-system/dict/dictionary?code=publish_status",
      dataType: "number",
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      value: 0,
      rules: [{
        required: true,
        message: "请配置发布状态",
        trigger: "blur"
      }],
      slot: true,
      width: 90,
      span: 24,
      gridRow: true,
    },
    {
      label: "排序号",
      prop: "sort",
      type: "number",
      slot: true,
      value: 999,
      width: 180,
      span: 24,
      gridRow: true,
    },
    {
      label: "品类说明",
      prop: "categoryDesc",
      type: "textarea",
      hide: true,
      span: 24,
      gridRow: true,
    },
    {
      label: "引导说明",
      prop: "categoryGuide",
      component: 'avue-ueditor',
      action: '/blade-resource/oss/endpoint/put-file',
      propsHttp: {
        res: 'data',
        url: 'link',
      },
      hide: true,
      minRows: 6,
      span: 24,
      gridRow: true,
    },
    {
      label: "最后更新时间",
      prop: "updateTime",
      type: "input",
      display: false,
      span: 24,
      gridRow: true,
    },
    {
      label: '',
      prop: 'imgBox',
      display: false,
    },
  ]
}
